package com.myprocessing.gui.util.image;

import java.util.HashMap;
import java.util.Map;

import com.myprocessing.box.Box;

import processing.core.PImage;

public class ImageManager extends Box{

	private static Map<String, PImage> images = new HashMap<String, PImage>();
	
	
	public static PImage getImage(String string){
		if(!images.containsKey(string)){
			PImage image = pApplet.loadImage(string);
			images.put(string, image);
		}
		
		return images.get(string);
	}
	
}
